- Create a next app by running
BASH
npx create-next-app my-nextjs-blog
- You can pick a template, but for this coleection we will start from scratch.
- create-next-app will install react, react-dom, and next using yarn
- cd into the directory you created and run code to open vscode.
BASH
cd my-nextjs-blogcode .
- The entry point of our next.js application will be pages/index.js
- Run yarn dev to start the development server
- Changes are reflected in the browser without having to refresh the page
- The tiny widget in the right-hand corner of the screen tells us that the page is pre-rendered. In Next.js we get server side rendering by default.